package com.example.vo.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.example.converter.LocalDateTimeConverter;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 菜单返回实体
 *
 * @author wsl
 */
@Data
public class MenuExcelVo {

    @ExcelProperty("菜单编号")
    private Integer id;

    @ExcelProperty("菜单名称")
    private String menuName;

    @ExcelProperty("路由组件")
    private String component;

    @ExcelProperty("排序")
    private Integer sort;

    @ExcelProperty(value = "前端路由path")
    private String path;

    @ExcelProperty("菜单图标url")
    private String iconUrl;

    @ExcelProperty("父菜单编号")
    private Integer parentId;

    @ExcelProperty("需要权限")
    private Integer requireAuth;

    @ExcelProperty("保持激活")
    private Integer keepAlive;

    @ExcelProperty("是否可用")
    private Integer enabled;

    @ExcelProperty("类型")
    private Integer type;

    @ExcelProperty("url")
    private String url;

    @ExcelProperty(value = "创建时间",converter = LocalDateTimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private LocalDateTime createTime;

    @ExcelProperty(value = "修改时间",converter = LocalDateTimeConverter.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    private LocalDateTime updateTime;
}
